home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
ctlib100.zip
/
INSTALL.LZH
/
CONTENTS.TXT
< prev
next >
Wrap
Text File
|
1996-10-12
|
8KB
|
153 lines
Introduction . . . . . . . . . . . . . . . . . . . . . . .1
What is the Containers Library?. . . . . . . . . .1
What you need to know. . . . . . . . . . . . . . .3
Documentation overview . . . . . . . . . . . . . .4
Using this manual . . . . . . . . . . . . . . .4
Using Online help . . . . . . . . . . . . . . .5
Manual conventions . . . . . . . . . . . . . . . .5
Additional information . . . . . . . . . . . . . .6
Part I: The shared programming interface
Chapter 1 Overview of the Containers Library. . . . . . .7
The Containers Library architecture. . . . . . . .7
What is data?. . . . . . . . . . . . . . . . . . .8
What is data access? . . . . . . . . . . . . . . .9
The base object: TContainer . . . . . . . . . 10
Linear containers . . . . . . . . . . . . . . 10
Linear data structures . . . . . . . . . . 10
The function of TSequence. . . . . . . . . 11
Sorted linear containers . . . . . . . . . 12
Non-linear containers . . . . . . . . . . . . 12
Non-linear data structures . . . . . . . . 13
The function of TGraph . . . . . . . . . . 14
Cursors . . . . . . . . . . . . . . . . . . . 14
What are data controls?. . . . . . . . . . . . . 15
Putting it all together. . . . . . . . . . . . . 16
Chapter 2 The base container object . . . . . . . . . . 19
Inheritance diagram. . . . . . . . . . . . . . . 19
Adding data to a container . . . . . . . . . . . 20
Deleting data from a container . . . . . . . . . 22
Deleting individual items . . . . . . . . . . 22
Deleting all items. . . . . . . . . . . . . . 23
Deleting and disposing of individual items. . 25
Deleting and disposing of all items . . . . . 25
The Count field. . . . . . . . . . . . . . . . . 25
Iterative methods. . . . . . . . . . . . . . . . 26
The ForEach iterator. . . . . . . . . . . . . 26
The ForEachThat iterator. . . . . . . . . . . 27
Conditionally deleting data . . . . . . . . . 28
The status of a container. . . . . . . . . . . . 29
Handling errors. . . . . . . . . . . . . . . . . 31
Packing a container. . . . . . . . . . . . . . . 32
Writing data-structure independent code. . . . . 33
Containers and streams . . . . . . . . . . . . . 35
Chapter 3 Linear containers . . . . . . . . . . . . . . 37
Inheritance diagram. . . . . . . . . . . . . . . 37
Using the At methods . . . . . . . . . . . . . . 38
Retrieving data using At. . . . . . . . . . . 38
Adding data using AtInsert. . . . . . . . . . 39
Replacing data. . . . . . . . . . . . . . . . 40
Deleting data . . . . . . . . . . . . . . . . 41
Moving in a linear container . . . . . . . . . . 42
First . . . . . . . . . . . . . . . . . . . . 42
Next. . . . . . . . . . . . . . . . . . . . . 42
Last. . . . . . . . . . . . . . . . . . . . . 43
Prev. . . . . . . . . . . . . . . . . . . . . 43
Seed values . . . . . . . . . . . . . . . . . 44
Iterative methods. . . . . . . . . . . . . . . . 44
The FirstThat and LastThat iterators. . . . . 45
The NextThat and PrevThat iterators . . . . . 46
Chapter 4 Non-linear containers . . . . . . . . . . . . 49
Inheritance diagram. . . . . . . . . . . . . . . 50
Using keys . . . . . . . . . . . . . . . . . . . 50
Retrieving data from a graph . . . . . . . . . . 52
KeyFirst and KeyLast. . . . . . . . . . . . . 52
ExactMatch. . . . . . . . . . . . . . . . . . 53
The CaseSensitive field. . . . . . . . . . . . . 55
Allowing duplicate keys. . . . . . . . . . . . . 55
Updating and replacing data. . . . . . . . . . . 56
Moving in a graph. . . . . . . . . . . . . . . . 57
First . . . . . . . . . . . . . . . . . . . . 58
Next. . . . . . . . . . . . . . . . . . . . . 58
Last. . . . . . . . . . . . . . . . . . . . . 59
Prev. . . . . . . . . . . . . . . . . . . . . 60
Iterative methods. . . . . . . . . . . . . . . . 61
The FirstThat and LastThat iterators. . . . . 61
KeyFirstThat and KeyLastThat. . . . . . . . . 62
The NextThat and PrevThat methods . . . . . . 63
Find and FindThat . . . . . . . . . . . . . . 64
Part II: Using the containers
Chapter 5 Before using the containers.... . . . . . . . 67
General information. . . . . . . . . . . . . . . 67
Storing non-objects. . . . . . . . . . . . . . . 68
Sorted Containers. . . . . . . . . . . . . . . . 69
Chapter 6 Collections . . . . . . . . . . . . . . . . . 71
What are collections?. . . . . . . . . . . . . . 71
Huge collections . . . . . . . . . . . . . . . . 72
Creating a collection. . . . . . . . . . . 72
Using the collection . . . . . . . . . . . 73
Iterative methods. . . . . . . . . . . . . 74
Using DoneItem . . . . . . . . . . . . . . 76
Sorted collections . . . . . . . . . . . . . . . 77
String collections . . . . . . . . . . . . . . . 78
Using Search . . . . . . . . . . . . . . . 79
Unsorted string collections. . . . . . . . 80
Stream collections . . . . . . . . . . . . . . . 81
Chapter 7 Arrays. . . . . . . . . . . . . . . . . . . . 83
What are arrays? . . . . . . . . . . . . . . . . 83
Memory based arrays. . . . . . . . . . . . . . . 85
Creating a memory based array. . . . . . . 85
Using a memory based array . . . . . . . . 86
Object arrays . . . . . . . . . . . . . . . . 87
Resizable arrays. . . . . . . . . . . . . . . 89
Sorted arrays . . . . . . . . . . . . . . . . 91
Stream arrays. . . . . . . . . . . . . . . . . . 91
Creating a stream array. . . . . . . . . . 92
Using a stream array . . . . . . . . . . . 92
Using DoneItem . . . . . . . . . . . . . . 93
Object arrays . . . . . . . . . . . . . . . . 95
Chapter 8 Linked Lists. . . . . . . . . . . . . . . . . 99
What are linked lists? . . . . . . . . . . . . . 99
Using the linked lists . . . . . . . . . . . . .100
Sorted Lists . . . . . . . . . . . . . . . . . .102
Chapter 9 Stacks and Queues . . . . . . . . . . . . . .105
What are stacks? . . . . . . . . . . . . . . . .105
Using the stacks . . . . . . . . . . . . . . . .106
What are queues? . . . . . . . . . . . . . . . .106
Using the queues . . . . . . . . . . . . . . . .107
Chapter 10 Tables . . . . . . . . . . . . . . . . . . .109
What are tables, fields and field structures?. .109
Using the Tables . . . . . . . . . . . . . . . .110
Creating a New Table. . . . . . . . . . . . .111
Initializing a table. . . . . . . . . . . . .113
Opening an Existing Table . . . . . . . . . .114
Data Management in Tables. . . . . . . . . . . .114
Object tables. . . . . . . . . . . . . . . . . .115
Chapter 11 Binary trees . . . . . . . . . . . . . . . .119
What are binary trees? . . . . . . . . . . . . .119
Using the binary trees . . . . . . . . . . . . .120
Chapter 12 B Trees. . . . . . . . . . . . . . . . . . .123
General overview . . . . . . . . . . . . . . . .123
What are B Trees?. . . . . . . . . . . . . . . .124
What are B+ Trees? . . . . . . . . . . . . . . .125
Using the B Trees. . . . . . . . . . . . . . . .126
Standard B Trees. . . . . . . . . . . . . . .127
Object B trees. . . . . . . . . . . . . . . .130
Opening an existing tree . . . . . . . . . . . .131
Index. . . . . . . . . . . . . . . . . . . . . . . . . .133